home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK2.toast / Development Kits (Disc 2) / Thread Manager / Thread Manager 2.1.1d1+ / ReadMe! < prev    next >
Encoding:
Text File  |  1995-04-28  |  1.5 KB  |  41 lines  |  [TEXT/MPS ]

  1. This folder contains the items necessary to utilize the Thread Manager with
  2. CFM-68k.  Place ThreadLib in your "{MPW}Libraries:SharedLibraries:" folder.
  3. NuThreadsLib.slb goes in your "{SystemFolder}Extensions:" folder.  For an
  4. example see the enclosed sample ThreadedSort.  This sample application has been
  5. changed to be compiled for CFM-68k and PowerPC.
  6.  
  7. Use this Threads.h file if you plan to use the Thread Manager with CFM-68k.  This
  8. header file has been updated to supply the Thread Manager with UniversalProcPtrs
  9. instead of ProcPtrs.  This header file is a prerelease version and hasn't had
  10. extensive testing.  It should be completely compatible with both classic 68k
  11. and PowerPC builds.
  12.  
  13. A caveat: Current source will need to be modified if CFM-68k support is required.
  14.  
  15. An example of the type of changes necessary appear below.  It is a snippit of code
  16. from SortPictThreads.cp, a Thread Manager Example program.  These changes are necessary
  17. because CFM-68k requires the use of UniversalProcPtrs and Routine Descriptors and Classic
  18. 68k and PowerPC don't.
  19.  
  20. #if defined(__CFM68K__)
  21.  
  22.     errWhatErr = NewThread(    kCooperativeThread, 
  23.                             ( ThreadEntryProcPtr )NewThreadEntryProc( SortPictsThreadEntry ), 
  24.                             ( void* )this, 
  25.                             20000,
  26.                             kCreateIfNeeded,
  27.                             ( void** )nil,
  28.                             &tempThreadInfo );
  29.                             
  30. #else
  31.  
  32.     errWhatErr = NewThread( kCooperativeThread, 
  33.                         ( ThreadEntryProcPtr )SortPictsThreadEntry, 
  34.                         ( void* )this, 
  35.                         20000,
  36.                         kCreateIfNeeded,
  37.                         ( void** )nil,
  38.                         &tempThreadInfo );
  39.                             
  40. #endif
  41.